﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [Table("LK_Attachment")]
    public class LKAttachment
    {
        [Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }


        private string _billNo;
        /// <summary>
        /// 单据编号
        /// </summary>
        [Column("BillNo")]
        public string BillNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_billNo))
                    _billNo = string.Empty;
                return _billNo;
            }
            set { _billNo = value; }
        }


        private int _billType;
        /// <summary>
        /// 单据类型
        /// </summary>
        [Column("BillType")]
        public int BillType
        {
            get
            {
                return _billType;
            }
            set { _billType = value; }
        }


        private string _attachmentName;
        /// <summary>
        /// 附件名称
        /// </summary>
        [Column("AttachmentName")]
        public string AttachmentName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_attachmentName))
                    _attachmentName = string.Empty;
                return _attachmentName;
            }
            set { _attachmentName = value; }
        }


        private string _originalName;
        /// <summary>
        /// 原始附件名称
        /// </summary>
        [Column("OriginalName")]
        public string OriginalName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_originalName))
                    _originalName = string.Empty;
                return _originalName;
            }
            set { _originalName = value; }
        }


        private bool _isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }


        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }


        private int _createUserId;
        /// <summary>
        /// 创建人id
        /// </summary>
        [Column("CreateUserId")]
        public int CreateUserId
        {
            get
            {
                return _createUserId;
            }
            set { _createUserId = value; }
        }


        private string _createUser;
        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreateUser")]
        public string CreateUser
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_createUser))
                    _createUser = string.Empty;
                return _createUser;
            }
            set { _createUser = value; }
        }


    }
}

